import os from "node:os";

// 操作系统
console.log(os.platform()); // win32
// CPU 架构
console.log(os.arch()); //  x64
// CPU Core Info
console.log(JSON.stringify(os.cpus())); // 会打印一个数组对象：Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
// Free memory
console.log(os.freemem()); // 28737560576
// Total memory
console.log(os.totalmem()); // 42747543552
// Home dir 就像linux系统一样
console.log(os.homedir()); // C:\Users\11930
// Uptime
console.log(os.uptime()); // 63907.937